package com.wq.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wq.dto.DepartmentDTO;
import com.wq.entity.Department;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wq
 * @since 2025-11-09
 */
public interface DepartmentService extends IService<Department> {

    /**
     * 分页查询部门列表
     * @param pageNum
     * @param pageSize
     * @param keyword
     * @return
     */
    Page<Department> getDepartmentList(Integer pageNum, Integer pageSize, String keyword);

    /**
     * 获取所有部门（用于下拉框）
     * @return
     */
    List<Department> getAllDepartments();

    /**
     * 添加部门
     * @param departmentDTO
     * @return
     */
    Department addDepartment(DepartmentDTO departmentDTO);

    /**
     * 更新部门
     * @param id
     * @param departmentDTO
     * @return
     */
    Boolean updateDepartment(Integer id, DepartmentDTO departmentDTO);

    /**
     * 删除部门
     * @param id
     * @return
     */
    Boolean deleteDepartment(Integer id);
}
